.class Lrexsee/network/RexseeBluetooth$13;
.super Ljava/lang/Thread;
.source "RexseeBluetooth.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/network/RexseeBluetooth;->writeBytes_([B)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/network/RexseeBluetooth;

.field private final synthetic val$bytes:[B


# direct methods
.method constructor <init>(Lrexsee/network/RexseeBluetooth;[B)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/network/RexseeBluetooth$13;->this$0:Lrexsee/network/RexseeBluetooth;

    iput-object p2, p0, Lrexsee/network/RexseeBluetooth$13;->val$bytes:[B

    .line 178
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 6

    .prologue
    .line 182
    :try_start_0
    iget-object v2, p0, Lrexsee/network/RexseeBluetooth$13;->this$0:Lrexsee/network/RexseeBluetooth;

    # getter for: Lrexsee/network/RexseeBluetooth;->mSocket:Landroid/bluetooth/BluetoothSocket;
    invoke-static {v2}, Lrexsee/network/RexseeBluetooth;->access$8(Lrexsee/network/RexseeBluetooth;)Landroid/bluetooth/BluetoothSocket;

    move-result-object v2

    invoke-virtual {v2}, Landroid/bluetooth/BluetoothSocket;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v1

    .line 183
    .local v1, "outStream":Ljava/io/OutputStream;
    iget-object v2, p0, Lrexsee/network/RexseeBluetooth$13;->val$bytes:[B

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write([B)V

    .line 184
    new-instance v2, Ljava/lang/String;

    iget-object v3, p0, Lrexsee/network/RexseeBluetooth$13;->val$bytes:[B

    invoke-direct {v2, v3}, Ljava/lang/String;-><init>([B)V

    invoke-static {v2}, Lrexsee/core/utilities/Escape;->escape(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 185
    .local v0, "data":Ljava/lang/String;
    iget-object v2, p0, Lrexsee/network/RexseeBluetooth$13;->this$0:Lrexsee/network/RexseeBluetooth;

    # getter for: Lrexsee/network/RexseeBluetooth;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v2}, Lrexsee/network/RexseeBluetooth;->access$1(Lrexsee/network/RexseeBluetooth;)Lrexsee/core/browser/Browser;

    move-result-object v2

    iget-object v2, v2, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v3, "onBluetoothDataWrite"

    const/4 v4, 0x1

    new-array v4, v4, [Ljava/lang/String;

    const/4 v5, 0x0

    aput-object v0, v4, v5

    invoke-virtual {v2, v3, v4}, Lrexsee/core/browser/clazz/EventList;->run(Ljava/lang/String;[Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    .line 188
    .end local v0    # "data":Ljava/lang/String;
    .end local v1    # "outStream":Ljava/io/OutputStream;
    :goto_0
    return-void

    .line 186
    :catch_0
    move-exception v2

    goto :goto_0
.end method
